using UnityEngine;
using System.Collections;

public enum GameStatus
{
    Start,//Phase Host / Join 
    Lobby,//Lancer jeu (chat)
	Game //La partie commence !!!
}

public class GeneralManager : MonoBehaviour {

    public bool isDebugFightingScene=false;
    public string playerName = "PlayerName";
	
    public GameStatus gameStatus = GameStatus.Start;

    //Game Settings
    //TODO : une classe pour stocker tout ça ?
    public string gameName;

    public void Awake()
    {
		//for testsing network
		Application.runInBackground = true;
		//-- if we change scenes
        DontDestroyOnLoad(gameObject);
        //init values
        gameStatus = GameStatus.Start;
    }
	
	public void Start()
    {
        //-------------------------------- TEST -----------------------------
		if (isDebugFightingScene)
		{
			this.GetComponent<GameMenus>().OnPlayersReady();
			gameStatus = GameStatus.Game;
			LaunchGame();
		}
    }
	
	// All Players ready to play !
	public void LaunchGame()
    {
        gameStatus = GameStatus.Game;
		this.GetComponent<GameMenus>().OnPlayersReady();
    }
}
